﻿<%@ Page Title="Inbox" Language="C#" MasterPageFile="~/Alumini/ALM-Menu.master" AutoEventWireup="true" CodeFile="ALM-InboxMessageList.aspx.cs" Inherits="InboxMessageList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="headSubMaster" Runat="Server">
<link rel="stylesheet" type="text/css" href="css/communication.css" />
<script type="text/javascript">
    function Redirect(MsgID,CommID) {
        window.location = 'ALM-ViewMessage.aspx?MessageID=' + MsgID + '&mBox=' + CommID+'&type=inbox';
    }
    function RFCompose(MsgID, CommID, Action) {
        window.location = 'ALM-RFCompose.aspx?MessageID=' + MsgID + '&mBox=' + CommID+'&Action='+Action;
    }
</script> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_SubMaster" Runat="Server">

<div id="page"><!--content page-->
<div class="left-btn">
<p><input type="button" value="compose" onclick="page('ALM-Compose.aspx');" /></p>
<p class="active"><input type="button" value="inbox" onclick="page('ALM-InboxMessageList.aspx');" /></p>
<p><input type="button" value="sent"  onclick="page('ALM-SentMessages.aspx');"/></p>
    
</div>

<div class="right">
<div class="sent-field">
<label><asp:LinkButton ID="lnkFrom" runat="server" onclick="lnkFrom_Click">From</asp:LinkButton></label>
<label class="subject"><asp:LinkButton ID="lnkSubject" runat="server" 
        onclick="lnkSubject_Click" >subject</asp:LinkButton></label>
<label style="width:140px;"><asp:LinkButton ID="lnkDate" runat="server" onclick="lnkDate_Click"  >date</asp:LinkButton></label>
<label></label>
<label></label>
<label></label>
</div>


<asp:ListView ID="lvSentMessages" runat="server" 
        ItemPlaceholderID="itemPlaceholder"  onitemcommand="gvNewFiles_ItemCommand" 
        onitemdatabound="lvSentMessages_ItemDataBound" >
    <LayoutTemplate>
<div runat="server" id="itemPlaceholder" />

</LayoutTemplate>
    <ItemTemplate>
     
            <asp:Label ID="lblIsRead" runat="server" Text='<%# Eval("IsRead") %>' Visible="false"></asp:Label>
<div class="sent-detail" id="divMain" runat="server">
<label onclick='Redirect(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>);'><%#Eval("UserName") %></label>

<label class="subject" onclick='Redirect(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>);'><%#Eval("Subject") %></label>

<label  style="width:140px;" onclick='Redirect(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>);'><%#Eval("ReceiveDate")%></label>

<label onclick='RFCompose(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>,"Reply");'>
<a onclick='RFCompose(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>,"Reply");'> Reply</a></label>

<label onclick='RFCompose(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>,"Forward");'>
<a onclick='RFCompose(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>,"Forward");'> Forward</a></label>

<label><asp:LinkButton runat="server" ID="lbtnFiles" Text='Delete' CommandArgument='<%#Eval("CommunicationID") %>'
CommandName="deleteFile"></asp:LinkButton></label>
</div>
    </ItemTemplate> 
    <AlternatingItemTemplate>
            <asp:Label ID="lblIsRead" runat="server" Text='<%# Eval("IsRead") %>' Visible="false"></asp:Label>
    <div class="sent-detailalternate"  id="divMain" runat="server">
<label onclick='Redirect(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>);'><%#Eval("UserName") %></label>
<label class="subject" onclick='Redirect(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>);'><%#Eval("Subject") %></label>
<label  style="width:140px;" onclick='Redirect(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>);'><%#Eval("ReceiveDate")%></label>
<label onclick='RFCompose(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>,"Reply");'>
<a onclick='RFCompose(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>,"Reply");'> Reply</a></label>
<label onclick='RFCompose(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>,"Forward");'>
<a onclick='RFCompose(<%# Eval("MessageID") %>,<%# Eval("CommunicationID") %>,"Forward");'> Forward</a></label>
<label><asp:LinkButton runat="server" ID="lbtnFiles" Text='Delete' CommandArgument='<%#Eval("CommunicationID") %>'
CommandName="deleteFile"></asp:LinkButton></label>
</div>
    </AlternatingItemTemplate>
       <EmptyDataTemplate>
<div>
<div class="sent-field1">
<label> 
You have no message in your inbox.
</label>
</div>
 

</div>
</EmptyDataTemplate>
</asp:ListView>
     

</div>

</div><!-- content page close-->
</asp:Content>

